// objpool_test.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include "../../../include/objpool.hpp"

class CTest
{
public:
	int m_i;
protected:
private:
};

int _tmain(int argc, _TCHAR* argv[])
{
	CObjPool<CTest> test_pool;

	CTest* test1 = test_pool.AllocObj();
	test1->m_i = 1;
	CTest* test2 = test_pool.AllocObj();
	test2->m_i = 2;
	CTest* test3 = test_pool.AllocObj();
	test3->m_i = 3;

	test_pool.FreeObj(test1);
	test_pool.FreeObj(test2);
	test_pool.FreeObj(test1);
	test_pool.FreeObj((CTest*)(0xffff0000));
	return 0;
}

